<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns:MSHelp="http://www.microsoft.com/MSHelp/" lang="en-us" xml:lang="en-us"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="DC.Type" content="reference">
<meta name="DC.Title" content="tick_count::interval_t Class">
<meta name="DC.subject" content="tick_count::interval_t Class">
<meta name="keywords" content="tick_count::interval_t Class">
<meta name="DC.Relation" scheme="URI" content="../../../reference/timing/tick_count_cls.htm">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="tick_count_interval_t_cls">
<meta name="DC.Language" content="en-US">
<link rel="stylesheet" type="text/css" href="../../../intel_css_styles.css">
<title>tick_count::interval_t Class</title>
</head>
<body id="tick_count_interval_t_cls">
 <!-- ==============(Start:NavScript)================= -->
 <script src="..\..\..\NavScript.js" language="JavaScript1.2" type="text/javascript"></script>
 <script language="JavaScript1.2" type="text/javascript">WriteNavLink(3);</script>
 <!-- ==============(End:NavScript)================= -->
<a name="tick_count_interval_t_cls"><!-- --></a>

 
  <h1 class="topictitle1">tick_count::interval_t Class</h1>
 
  
  <div> 
	 <div class="section"><h2 class="sectiontitle">Summary</h2> 
		 
		<p>Class for relative wall-clock time.
		</p>
 
	 </div>

	 <div class="section"><h2 class="sectiontitle">Syntax</h2>
		 
		<pre>class tick_count::interval_t;</pre> 
	 </div>

	 <div class="section"><h2 class="sectiontitle">Header</h2>
		 
		<pre>#include "tbb/tick_count.h"</pre> 
	 </div>

	 <div class="section"><h2 class="sectiontitle">Description</h2>
		 
		<p>A 
		  <samp class="codeph">tick_count::interval_t</samp> represents relative wall clock
		  duration. 
		</p>
 
	 </div>

	 <div class="section"><h2 class="sectiontitle">Members</h2>
		
		<pre>
namespace tbb {

    class tick_count::interval_t {
    public:
        interval_t();
        explicit interval_t( double sec );
        double seconds() const;
        interval_t operator+=( const interval_t&amp; i );
        interval_t operator-=( const interval_t&amp; i );
    };

    tick_count::interval_t operator+( 
        const tick_count::interval_t&amp; i, 
        const tick_count::interval_t&amp; j );

    tick_count::interval_t operator-( 
        const tick_count::interval_t&amp; i, 
        const tick_count::interval_t&amp; j );

} // namespace tbb
                </pre> 
		
<div class="tablenoborder"><table cellpadding="4" summary="" frame="border" border="1" cellspacing="0" rules="all"><span class="tabledesc">The following table provides additional information on the
			 members of this template class. 
		  </span><thead align="left"> 
				<tr> 
				  <th class="cellrowborder" valign="top" width="33.89830508474576%" id="d125500e76">Member 
				  </th>
 
				  <th class="cellrowborder" valign="top" width="66.10169491525423%" id="d125500e79">Description 
				  </th>
 
				</tr>
</thead>
 
			 <tbody> 
				<tr> 
				  <td class="cellrowborder" valign="top" width="33.89830508474576%" headers="d125500e76 "><span class="keyword">interval_t()</span> 
				  </td>
 
				  <td class="cellrowborder" valign="top" width="66.10169491525423%" headers="d125500e79 ">
					 <p>Constructs 
						<samp class="codeph">interval_t</samp> representing zero time duration.
					 </p>
 
				  </td>
 
				</tr>
 
				<tr> 
				  <td class="cellrowborder" valign="top" width="33.89830508474576%" headers="d125500e76 "><span class="keyword">interval_t( double sec )</span>
					 
				  </td>
 
				  <td class="cellrowborder" valign="top" width="66.10169491525423%" headers="d125500e79 ">
					 <p>Constructs 
						<samp class="codeph">interval_t</samp> representing specified number of
						seconds.
					 </p>
 
				  </td>
 
				</tr>
 
				<tr> 
				  <td class="cellrowborder" valign="top" width="33.89830508474576%" headers="d125500e76 "><span class="keyword">double seconds() const</span> 
				  </td>
 
				  <td class="cellrowborder" valign="top" width="66.10169491525423%" headers="d125500e79 ">
					 <p><strong>Returns</strong>: Time interval measured in
						seconds.
					 </p>
 
				  </td>
 
				</tr>
 
				<tr> 
				  <td class="cellrowborder" valign="top" width="33.89830508474576%" headers="d125500e76 "><span class="keyword">interval_t operator+=( const
						interval_t&amp; i )</span> 
				  </td>
 
				  <td class="cellrowborder" valign="top" width="66.10169491525423%" headers="d125500e79 ">
					 <p><samp class="codeph">*this = *this + i</samp>
					 </p>
 
					 <p><strong>Returns</strong>: Reference to 
						<samp class="codeph">*this</samp>.
					 </p>
 
				  </td>
 
				</tr>
 
				<tr> 
				  <td class="cellrowborder" valign="top" width="33.89830508474576%" headers="d125500e76 "><span class="keyword">interval_t operator-=( const
						interval_t&amp; i )</span> 
				  </td>
 
				  <td class="cellrowborder" valign="top" width="66.10169491525423%" headers="d125500e79 ">
					 <p><samp class="codeph">*this = *this - i</samp>
					 </p>
 
					 <p><strong>Returns</strong>: Reference to 
						<samp class="codeph">*this</samp>.
					 </p>
 
				  </td>
 
				</tr>
 
				<tr> 
				  <td class="cellrowborder" valign="top" width="33.89830508474576%" headers="d125500e76 "><span class="keyword">interval_t operator+ ( const
						interval_t&amp; i, const interval_t&amp; j )</span> 
				  </td>
 
				  <td class="cellrowborder" valign="top" width="66.10169491525423%" headers="d125500e79 ">
					 <p><strong>Returns</strong>: Interval_t representing
						sum of intervals 
						<samp class="codeph"><em>i</em> 
						</samp>and 
						<samp class="codeph"><em>j</em></samp>.
					 </p>
 
				  </td>
 
				</tr>
 
				<tr> 
				  <td class="cellrowborder" valign="top" width="33.89830508474576%" headers="d125500e76 "><span class="keyword">interval_t operator- ( const
						interval_t&amp; i, const interval_t&amp; j )</span> 
				  </td>
 
				  <td class="cellrowborder" valign="top" width="66.10169491525423%" headers="d125500e79 ">
					 <p><strong>Returns</strong>
					 </p>
 
					 <p><samp class="codeph">Interval_t</samp> representing
						difference of intervals 
						<samp class="codeph"><em>i</em> 
						</samp>and<samp class="codeph"> 
						  <em>j</em>.</samp>
					 </p>
 
				  </td>
 
				</tr>
 
		
			 </tbody>
 
		  </table>
</div>

                <div class="Note"><h3 class="NoteTipHead">
					Caution</h3> 
	            <p> 
                    On Microsoft Windows* operating systems, the current implementation of
                    <samp class="codeph">tick_count::seconds()</samp> uses the function
                    <samp class="codeph">QueryPerformanceFrequency</samp>.  Repeated calls to
                    <samp class="codeph">tick_count::seconds()</samp> result in multiple calls to
                    <samp class="codeph">QueryPerformanceFrequency</samp>, which can be inefficient.
                    In tight loops accumulated time should be stored as
                    <samp class="codeph">tick_count::interval_t</samp> values, with conversion to
                    <samp class="codeph">tick_count::seconds()</samp> performed outside measured code.
		    </p>
 
                 </div> 
	 </div>
 
  </div>
 

<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong>&nbsp;<a href="../../../reference/timing/tick_count_cls.htm">tick_count Class</a></div>
</div>
<div></div>

</body>
</html>
